package com.feign;

import java.io.Serializable;

/**
 * 返回对象实体
 *
 * @author Ziroom
 *
 * @param <T>
 */
public class Resp<T> implements Serializable {

	private static final long serialVersionUID = -8687610453688716737L;
	private String status;
    private String message;
    private int code;
    private T data;

	public int getCode() {
		return code;
	}

	public Resp<T> setCode(int code) {
		this.code = code;
		return this;
	}

	public String getMessage() {
		return message;
	}

	public Resp<T> setMessage(String message) {
		this.message = message;
		return this;
	}

	public T getData() {
		return data;
	}

	public Resp<T> setData(T data) {
		this.data = data;
		return this;
	}

	public String getStatus() {
		return status;
	}

	public Resp<T> setStatus(String status) {
		this.status = status;
		return this;
	}

	@Override
    public String toString() {
        return "{\"code\": "+this.code+"," +
                "\"message\": \""+this.message+"\"," +
                "\"status\": \""+this.status+"\"," +
                "\"data\": "+this.data+ "}";
    }

}
